#ifndef BROWSERBUTTONS_H
#define BROWSERBUTTONS_H

#include <QWidget>
#include <QToolBar>
#include <QToolButton>
#include <QFrame>
#include <qtextbrowser.h>
#include <qdirmodel.h>
#include <QMenu>
#include <QToolButton>
#include <QVBoxLayout>
#include <QSpacerItem>
#include <QLineEdit>
#include <QHBoxLayout>
#include <QLabel>

/*! \class BrowserButtons
    \brief Draws file browser buttons.
    BrowserButtons class is used to draw all file browser required buttons. Depending on the device type it does some specific
    adaptations:
        - For mobile devices buttons sizes are fixed
        - For desktop PCs some more butons are added

    For desktop environment BrowserButtons::tbView is shown by default but it has to be connected to a slot, is not connected by default
    BrowserButtons::tbExit is hidden by default but is connectedo to application's exit slot
*/
class BrowserButtons : public QToolBar
{
    Q_OBJECT
public:
    //! Class constructor
    /*!
      This function adds the buttons and sets common sizes
      */
    explicit BrowserButtons(QWidget *parent = 0);
    //! Buttons container
    QFrame *tButtons;
    //! Horizontal layout for displaying buttons in the container
    QHBoxLayout *layout;
    //! Go to previous url button
    QToolButton *tbPrev;
    //! Go to next url button
    QToolButton *tbNext;
    //! Go to on level up button
    QToolButton *tbUp;
    //! Go to defined home url button
    QToolButton *tbHome;
    //! Button to change between icon or list view modes
    QToolButton *tbView;
    //! Button for maximizing the window. It is shown by default but needs to be connected to a slot
    QToolButton *tbFull;    
    //! Exit button. This button is hidden by default by connected to application's exit slot
    QToolButton *tbExit;

private:

signals:

public slots:
    /*!
      Performs some actions to adapt the layout to mobile devices
      */
    void setMobileGUI();
    /*!
      Performs some actions to adapt the layout to desktop PCs, i.e. it adds some more buttons
      */
    void setDesktopGUI();
};

#endif // BROWSERBUTTONS_H
